std::memchr

From Cppreference

Jump to: navigation, search
Defined in header <cstring>

const void *memchr( const void *ptr, int ch, size_t count );

​      void *memchr(       void *ptr, int ch, size_t count );

Finds the first occurrence of the byte ch in the memory region pointed to by ptr.

Contents

Parameters

ptr - pointer to the memory region to be examined
ch - byte to search for
count - number of bytes to examine

Return value

pointer to the found byte, or NULL if no such byte is found.

Example

See also

strchr
finds the first occurrence of a character
(function)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages